import { defineConfig } from 'wxt';
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

// See https://wxt.dev/api/config.html
export default defineConfig({
    modules: ['@wxt-dev/module-vue'],
    srcDir: "src",             // default: "."
    manifest: {
        permissions: ["activeTab", "storage", "sidePanel", "contextMenus"],
        host_permissions: ['*://*/*'],
        name: "tts-wxt",
    },
    vite: () => ({
        plugins: [
            // ...
            AutoImport({
                resolvers: [ElementPlusResolver()],
            }),
            Components({
                resolvers: [ElementPlusResolver()],
            }),
        ],
    }),
});